<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!doctype html>
<html>
<head>
    <meta name="renderer" content="webkit">
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <script type="text/javascript" src="/js/jquery-1.8.2.min.js"></script>
    <script type="text/javascript" src="/js/jquery.reveal.min.js"></script>
    <script type="text/javascript" src="/js/common.min.js"></script>
    <script src="/js/ds.js"></script>
    <script src="/js/messenger.min.js"></script>
    <script type="text/javascript" src="/js/beta.min.js"></script>
    <link rel="stylesheet" type="text/css" href="/css/iAsk.login.min.css">
    <script type="text/javascript" src="/js/messenger.min.js"></script>
    <script type="text/javascript" src="/js/common.login.plug.min.js"></script>
    <link rel="stylesheet" type="text/css" href="/css/iShare_base.min.css">
    <link rel="stylesheet" type="text/css" href="/css/iShare_list.min.css">
    <link rel="stylesheet" type="text/css" href="/css/public.min.css">
    <link rel="stylesheet" type="text/css" href="/css/ishare_format.min.css">
    <link rel="stylesheet" type="text/css" href="/css/ishare_nav.min.css ">
    <link rel="stylesheet" type="text/css" href="/css/top_bar.min.css">
    <link rel="stylesheet" type="text/css" href="/css/ishare_nav.min.css">
    <link rel="stylesheet" type="text/css" href="/css/ishare_footer.min.css">
    <link rel="stylesheet" type="text/css" href="/css/crumb.min.css">
    <script type="text/javascript" src="/js/jquery.jcarousellite.min.js"></script>
    <script type="text/javascript" src="/js/json2.min.js"></script>
    <script type="text/javascript" src="/js/public.min.js"></script>
    <script type="text/javascript" src="/js/iShare.min.js"></script>
    <script type="text/javascript" src="/js/dialog.js"></script>
    <script type="text/javascript" src="/js/ajaxfileupload.js"></script>
    <script type="text/javascript">
        var _hmt = _hmt || [];
        try {
            (function () {
                var hm = document.createElement("script");
                hm.src = "https://hm.baidu.com/hm.js?17cdd3f409f282dc0eeb3785fcf78a66";
                var s = document.getElementsByTagName("script")[0];
                s.parentNode.insertBefore(hm, s);
            })();
            _hmt.push(['_setAccount', '17cdd3f409f282dc0eeb3785fcf78a66']);
            (function () {
                var myDate = new Date();
                myDate.setTime(-1000);//设置时间
                document.cookie = "ishareHistory=''; expires=" + myDate.toGMTString();
            })();
        } catch (e) {
        }
    </script>
    <script type="text/javascript" src="/js/baidu-statistics.min.js"></script>
    <style type="text/css">
        .sogou_sugg_feedbackquan {
            display: none !important;
        }
    </style>
    <script type="text/javascript" src="/js/jquery.jcarousellite.min.js"></script>
</head>
<body>
<script type="text/javascript">
    if (new Date().getTime() < Date.parse('2018-03-12T00:00:00')) {
        $('body').addClass('spring-festival lantern');
    }
</script>
<div class="top-bar cf">
    <div class="fr">
        <div class="user-info"><em style="margin-left: -40px">您好！</em>
            <c:choose>
                <c:when test='${sessionScope.get("user") == null}'>
                    <a class="login-link" href='/jsp/login.jsp'>请登录</a>
                </c:when>
                <c:otherwise>
                    <div class="user-info" style="display:block;">
                        <div class="user-name fl" id="J_user_name">
                            <a href="#">
                                <div class="user-img fl">
                                    <img src="/images/headimg/${sessionScope.get('user').photo}" width="20" height="20">
                                </div>
                                <p class="name">${sessionScope.get("user").nickname}</p>
                                <i class="icon icon-arrow"></i>
                            </a>
                            <div class="user-nav">
                                <p><a id="my-info">我的资料</a></p>
                                <p><a id="modify-password">修改密码</a></p>
                                <p><a href="/user/log_out" class="exit" id="exit"><i class="icon icon-exit"></i>退出</a>
                                </p>
                            </div>
                        </div>
                    </div>
                </c:otherwise>
            </c:choose>
        </div>
    </div>
</div>

<div id="common_dialog" class="dialog">
    <a title="关闭" class="close">关闭</a>
    <div class="dialog-con">
        <h2 name="title">我的信息</h2>
        <div class="dialog-btn-con">
            <span id="uId" style="display: none">${requestScope.get("user").uId}</span>
            <ul class="persion-info">
                <li style="margin-top: 0px">
                    <span for="account">账户:</span>
                    <input class="input-text" id="account" type="text" disabled="disabled"
                           value="${sessionScope.get('user').account}"/>
                </li>
                <li>
                    <span for="nickname">昵称:</span>
                    <input class="input-text" id="nickname" type="text" value="${sessionScope.get('user').nickname}"/>
                </li>
                <li>
                    <label for="email">邮箱:</label>
                    <input class="input-text" id="email" type="text" value="${sessionScope.get('user').emial}"/>
                </li>
                <li>
                    <input type="button" id="ok-change-info" class="btn" value="确认修改信息"/>
                </li>
            </ul>
            <div class="persion-img" style="margin-left: 30px;">
                <div style="width: 150px;margin-left: 30px;float: left">
                    <img id="headimg" src="/images/headimg/${sessionScope.get('user').photo}"
                         style="width: 150px;height: 150px;">
                    <input id="change-headimg" class="btn" type="button" value="修改头像" style="margin-top: 10px;">
                </div>
                <div id="change-div" style="width:150px;float: left;margin-left: 10px;display: none">
                    <input id="file" name="file" type="file" style="margin-top: 30px;">
                    <input id="ok-change-headimg" class="btn" type="button" value="确认修改" style="margin-top: 30px;">
                </div>
            </div>
        </div>
    </div>
</div>

<div id="forbidDialog" class="dialog">
    <a href="javascript:void(0);" class="close" title="关闭">关闭</a>
    <div class="dialog-con">
        <h2>修改密码</h2>
        <div class="block-con">
            <ul>
                <li>
                    <span for="oldpassword">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;旧密码:</span>
                    <input class="input-text" id="oldpassword" type="password"/>
                </li>
                <li style="margin-top: 20px">
                    <span for="newpassword">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;新密码:</span>
                    <input class="input-text" id="newpassword" type="password"/>
                </li>
                <li style="margin-top: 20px">
                    <label for="con-password">确认新密码:</label>
                    <input class="input-text" id="con-password" type="password"/>
                </li>
            </ul>
        </div>
        <div class="dialog-btn-con btn-block">
            <a href="javascript:void(0);" id="ok-password" class="btn-dialog">确定</a>
        </div>
    </div>
</div>

<div class="header">
    <div class="pw pw-v cf">
        <span class="fireworks fireworks-01"></span>
        <span class="fireworks fireworks-02"></span>
        <span class="fireworks fireworks-03"></span>
        <span class="fireworks fireworks-04"></span>
        <a href="/jsp/index.jsp" class="logo fl"><span
                style="font-size: 24px;font-style: italic;font-family: 'Microsoft Yahei';color: black;">图书爱分享!</span></a>
        <div class="search-con fl">
            <div class="search-input-con">
                <div class="search-input-box fl"><input id="scondition" type="text" class="search-input " value=""
                                                        maxlength="20"/></div>
                <a rel="nofollow" class="btn-search" id="btnSearch"><i class="icon-iShare"></i>搜索</a>
                <script>
                    $("#btnSearch").click(function () {
                        var key = $("#scondition").val();
                        if (key == "") {
                            alert("请输入搜索的内容");
                            return;
                        } else {
                            window.open("view-source.jsp?key=" + key);
                        }
                    })
                </script>
                <div id="lately-search" class="lately-search" style="display: none;">
                    <ul class="lately-list">
                        <li><a href="javascript:;">搜索内容</a></li>
                        <li><a href="javascript:;">搜索内容</a></li>
                        <li><a href="javascript:;">搜索内容</a></li>
                        <li><a href="javascript:;">搜索内容</a></li>
                    </ul>
                </div>
            </div>
            <div class="search-choose">
            </div>
            <div class="tui-header">
            </div>
        </div>
    </div>
</div>
<div class="contain" style="min-height: 600px;">
    <link rel="stylesheet" type="text/css" href="http://static3.iask.cn/v20180321/css/iShare_index.min.css">
    <script type="text/javascript" src="http://static3.iask.cn/v20180321/js/ishareBrowserData.min.js"></script>
    <script type="text/javascript" src="http://static3.iask.cn/v20180321/js/index.min.js"></script>
    <style type="text/css">.hide {
        display: none !important;
    }</style>
    <div class="nav">
        <div class="pw pw-v">
            <ul class="nav-list">
                推荐书籍<span
                    style="font-size: 12px;color: rgba(76,105,140,0.62);">(我们会根据下载、评论记录给您推荐您可能喜欢的书籍。记录越多，推荐会越准确。)</span>
            </ul>
        </div>
    </div>
    <%--搜索结果列表--%>
    <div class="fl" style="width: 1160px;margin-left: 50px;">
        <table class="list-table mt20" cellpadding="0">
            <thead>
            <tr>
                <td width="336">格式/书名</td>
                <td width="103">作者</td>
                <td width="103">上传者</td>
                <td class="text-center" width="55">评分</td>
                <td class="text-center f-order" width="114" name="1899-all-download"><span class="short-link ">下载次数<i
                        class="icon-iShare"></i></span></td>
                <td class="text-center f-order" name="1899-all-time"><span class="short-link short-link-choose">上传时间<i
                        class="icon-iShare"></i></span></td>
            </tr>
            </thead>
            <tbody id="booklist">
            <script>
                //获取推荐书籍
                $.get("/get_book_by_cf", function (result) {
                    var json = JSON.parse(result);
                    var list = json.list;
                    if (list.length == 0) {
                        $("#booklist").html('<h2>你的记录太少，我们无法推荐您可能喜欢的书籍</h2>');
                        return;
                    }
                    //添加搜索结果列表
                    for (var i = 0; i < list.length; i++) {
                        $("#booklist").append(' <tr>\n' +
                            '                        <td>\n' +
                            '                            <p class="list-text"><i class="ico-data ico-' + list[i].format + '"></i>\n' +
                            '                            <a href="/into_bookInfo?bookId=' + list[i].bookId + '" target="_blank" >' + list[i].bookName + '</a></p>\n' +
                            '                        </td><td><a class="user-name">' + list[i].bookAnthou + '</a></td>\n' +
                            '                        <td><a class="user-name">' + list[i].user.nickname + '</a></td>\n' +
                            '                        <td class="text-center">' + list[i].score + '</td>' +
                            '                        <td class="text-center">' + list[i].downloadNumber + '</td>\n' +
                            '                        <td class="text-center">'+list[i].uploadDate+'</td>\n' +
                            '                    </tr>')
                    }
                })
            </script>
            </tbody>
        </table>
        <div id="page_con" class="page-con mt25">
            <input type="hidden" value="time" id="orderId"/>
        </div>
    </div>
</div>

<div class="footer-con mt30">
    <div class="pw footer">
        <div class="copy-con">
            <p class="footer-nav">
                <a href="/agreement.html" rel="nofollow" target="_blank">网站声明</a>
                <a href="/infringement.html" rel="nofollow" target="_blank">侵权处理</a>
                <a href="https://iask.sina.com.cn/helpCenter/ishare.html" rel="nofollow" target="_blank">帮助中心</a>
                <a href="https://iask.sina.com.cn" target="_blank">爱问首页</a>
                <a href="/sitemap.html" target="_blank">网站地图</a>
                <a href="/feedAndComp/userFeedback" class="user-feedback" target="_blank">意见反馈</a>
            </p>
            <p class="copy-txt">Copyright &copy; 1996-2017 IASK Corporation, All Right Reserved</p>
        </div>
    </div>
</div>
<div class="fix-right">
    <a href="javascript:void(0);" class="fix-item back-top" id="backToTop"><i class="icon-iShare"></i>
        <p>返回<br>顶部</p></a>
</div>
<script type="text/javascript" src="http://static3.iask.cn/v20180321/js/foot.min.js"></script>
</div>
</body>
</html>
